Companion

object Companion

Properties

Link copied to clipboard
const val ACCOUNT: Int = 5

sort by account (this is always 'other' acct - the first split's account).

Link copied to clipboard
const val ACCOUNT_NAME: Int = 17
Link copied to clipboard

Compare two accounts by name, for sorting a list by account name. Uses the full name so that sub-accounts are kept with their parent accounts.

Compare two accounts, first hierarchically by account type, and then by case-insensitive name comparison. Please note: case-insensitive comparisons are slow, so don't do this frequently.

Link copied to clipboard

Compare two accounts by name, for sorting a list by account name. Uses the full name so that sub-accounts are kept with their parent accounts.

Link copied to clipboard
const val ACTION: Int = 10
Link copied to clipboard
const val AMOUNT: Int = 3
Link copied to clipboard
Link copied to clipboard
const val CATEGORY: Int = 13

Sort by category account. Only use this when sorting splits.

Link copied to clipboard
const val CATEGORY_NAME: Int = 18
Link copied to clipboard
const val CHECKNUM: Int = 9
Link copied to clipboard
const val CHECKNUM_INT: Int = 11
Link copied to clipboard
const val CHECKNUM_PARENT: Int = 16

Sort by check#, but only check the parent's check# and ignore the split's.

Link copied to clipboard
const val DATE: Int = 0
Link copied to clipboard
const val DATE_ENTERED: Int = 1
Link copied to clipboard

Comparator for sorting transactions by date-entered.

Link copied to clipboard
const val DATE_THEN_AMOUNT: Int = 7
Link copied to clipboard
const val DATE_THEN_CHECKNUM: Int = 8
Link copied to clipboard

Compare two transactions, first by transaction date and then, if the dates are the same, by the date the transaction was created. , first hierarchically by account type, and then by case-insensitive name comparison. Please note: case-insensitive comparisons are slow, so don't do this frequently.

Link copied to clipboard
const val DATE_THEN_STATUS: Int = 6
Link copied to clipboard
const val DESCRIPTION: Int = 2
Link copied to clipboard
const val NOT_CATEGORY: Int = 14

Sort by non-category account. Only use this when sorting splits.

Link copied to clipboard
const val STATUS_THEN_CKNUM: Int = 12
Link copied to clipboard
const val STATUS_THEN_DATE: Int = 4
Link copied to clipboard
const val TAXDATE_THEN_CHECKNUM: Int = 15

Sort by tax date then by check#.

Link copied to clipboard

Functions

Link copied to clipboard

Retrieves a set of all accounts from the provided account book that match the given search filter

Link copied to clipboard

Return a list of accounts matching the given filter

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun compareAccountsByHierarchy(a1: Account?, a2: Account?, caseSensitiveNames: Boolean = true): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Compare the category account for two transactions.

Link copied to clipboard
Link copied to clipboard

Compare the two transactions based on their check number and then their amount if the check numbers are the same. @since build 566

Link copied to clipboard
fun compCheckNumBoth(t1: Txn, t2: Txn, forceUseParent: Boolean): Int

Compare the check number field for both numeric only and also text values.

Link copied to clipboard
Link copied to clipboard

Compare the check number field, but only use the parent transaction's check number, do not use the check number for a split. This is used for sorting transactions for display to the user. At this time the user may not specify a check number for a split, so it is irrelevant and messes up the sort order.

Link copied to clipboard
fun compDate(t1: Txn, t2: Txn): Int

Compare the transaction date of two transactions.

Link copied to clipboard
fun compDateCheckNum(t1: Txn, t2: Txn, useTaxDate: Boolean): Int

Compare two transactions by date.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Compare the description, or 'payee', of two transactions.

Link copied to clipboard
Link copied to clipboard
fun compStatus(t1: Txn, t2: Txn): Int
Link copied to clipboard
Link copied to clipboard

Compare the tax date of two transactions.

Link copied to clipboard
fun findAccountWithID(root: Account, accountUUID: String?): Account?

Find and return the account having the given UUID

Link copied to clipboard

Adds to the list of all items that reference the given account. This is used to gather a list of items that must be deleted when the account is deleted.

Link copied to clipboard

Return the first account that matches the given filter under the specified account

Link copied to clipboard

Return an iterator for all of the accounts that are under the given account. If the root account is provided, all accounts will be included in the iterator.

Return an iterator for all of the accounts that are within the given data set. If the root account is provided, all accounts will be included in the iterator.

Link copied to clipboard
fun getBalanceAsOfDate(book: AccountBook, account: Account, asofDate: Int): Long
fun getBalanceAsOfDate(book: AccountBook, account: Account, asofDate: Int, outOfDateAsZero: Boolean): Long

Get a single account's balance as of a given date. Transactions for that date will be included, so it is the balance as of the end of the given date. The balance will be in the account's currency type.

Link copied to clipboard

Get a single account's balance as of a list of given dates. The balances will be in the account's currency type. This method returns a zero balance if the given dates are before the earliest transaction and the account's start date.

fun getBalancesAsOfDates(book: AccountBook, account: Account, asofDates: IntArray?, outOfDateAsZero: Boolean): LongArray

Get a single account's balance as of a list of given dates. The balances will be in the account's currency type. If a given date is prior to both the earliest transaction and the account's start date, then return Long.MIN_VALUE for the balance. Transactions for the given date will be included, so it is the balance as of the end of the given date. If outOfDateAsZero is true, this is overridden and 0 is returned even if the date is too early.

Link copied to clipboard

Returns the account of the other side of the given transaction, but only if the other side doesn't contain multiple splits.

Link copied to clipboard

Get the default category to use for transactions in the given account. This is guaranteed to return a non-null value.

Link copied to clipboard

Get the default category to use for fees in the given account. This is guaranteed to return a non-null value.

Link copied to clipboard

Get the default transfer account for transaction in the given account.

Link copied to clipboard

Return an AcctFilter that applies the given filter but also disallows inactive accounts (or offspring of inactive accounts)

Link copied to clipboard
Link copied to clipboard

Return the non-category account from a transaction. If there are only category accounts on both sides of the transaction, or if it is in a category account with more than one split, return null.

Link copied to clipboard
fun insertSortedTransaction(transactions: TxnSet, t: AbstractTxn, sortedBy: Int): Int

Inserts the given transaction into the specified array in sorted order.

Link copied to clipboard

Returns true iff the given online account can be associated with the given local account.

Link copied to clipboard
fun isTransactionSorted(index: Int, t: AbstractTxn, transactions: TxnSet, sortedBy: TxnSortOrder): Boolean
fun isTransactionSorted(index: Int, t: AbstractTxn, transactions: TxnSet, sortedBy: Int): Boolean
Link copied to clipboard
fun sortTransactions(transactions: TxnSet, sortField: Int)
Link copied to clipboard

Gather the current value of all accounts matching the given filter for each currency